package com.example.demo.day.config.learn.test1.controller;

import com.example.demo.day.config.learn.test1.User;
import com.example.demo.day.config.learn.test1.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class HelloController {

    @Autowired
    HelloService helloService;

    @ResponseBody
    @RequestMapping("/hello")
    public String hello() {
        return helloService.ss();
    }

    @ResponseBody
    @RequestMapping("/users")
    public Object users() {
        return helloService.findAllUsers();}
}
